<!DOCTYPE html>
<html>
<head>
    <title></title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <Row :gutter="16">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="q.uname" @on-enter="query" placeholder="姓名或手机号码"/>
                </i-col>
               <!-- <i-col span="4">
                    <i-input v-model="q.telNumber" @on-enter="query" placeholder="联系电话"/>
                </i-col>-->
                <i-button @click="query">查询</i-button>
            </div>
            <div class="buttons-group">
                <i-button type="primary" @click="upkeepList"><i class="fa fa-map"></i>&nbsp;维护历史</i-button>
                <i-button type="warning" @click="updateCustomer"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
            </div>
        </Row>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>
    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
        <i-form ref="formValidate" :model="user" :rules="ruleValidate" :label-width="80">
            <Form-item label="会员名称" prop="username">
                <i-input v-model="user.uname" placeholder="客户姓名"/>
            </Form-item>
            <Form-item label="性别" prop="gender">
                <Radio-group v-model="user.gender">
                    <Radio label="1">
                        <span>男</span>
                    </Radio>
                    <Radio label="2">
                        <span>女</span>
                    </Radio>
                    <Radio label="3">
                        <span>未知</span>
                    </Radio>
                </Radio-group>
            </Form-item>
            <Form-item label="出生日期" prop="birthday">
                <Date-picker v-model="user.birthday" placeholder="出生日期"></Date-picker>
            </Form-item>
            <Form-item label="手机号码" prop="mobile">
                <i-input v-model="user.mobile" placeholder="手机号码"/>
            </Form-item>
            <Form-item label="职务" prop="job">
                <i-input v-model="user.job" placeholder="职务"/>
            </Form-item>

            <Form-item label="省" prop="provinceName" style="width: 268px;">
                <i-select v-model="user.addressEntity.provinceName" @on-change="proNameChange" filterable>
                    <i-option v-for="provinceName in provinceNames" :value="provinceName.name" :key="provinceName.id">
                        {{provinceName.name}}
                    </i-option>
                </i-select>
            </Form-item>
            <Form-item label="市" prop="cityName" style="width: 268px;">
                <i-select v-model="user.addressEntity.cityName" @on-change="proNameCityChange" filterable>
                    <i-option v-for="cityName in cityNames" :value="cityName.name" :key="cityName.id">
                        {{cityName.name}}
                    </i-option>
                </i-select>
            </Form-item>
            <Form-item label="区" prop="countyName" style="width: 268px;">
                <i-select v-model="user.addressEntity.countyName" filterable>
                    <i-option v-for="countyName in countyNames" :value="countyName.name" :key="countyName.id">
                        {{countyName.name}}
                    </i-option>
                </i-select>
            </Form-item>
            <Form-item label="详细地址" prop="detailInfo">
                <i-input v-model="user.addressEntity.detailInfo" placeholder="详细地址"/>
            </Form-item>
           <!-- <Form-item label="推广人id" prop="promoterId">
                <i-input v-model="user.promoterId" placeholder="推广人id"/>
            </Form-item>
            <Form-item label="推广人姓名" prop="promoterName">
                <i-input v-model="user.promoterName" placeholder="推广人姓名"/>
            </Form-item>-->
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>
                返回</i-button>
                <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
    </Card>
</div>

<script src="${rc.contextPath}/js/shop/customer.js?_${date.systemTime}"></script>
</body>
</html>